Fedora6MinimalInstall071
Category:Distributions Category:Fedora I started this page because I needed help to install Fedora from scratch and use it in colinux. Now I did it myself by with help from this wiki and colinux mailing list. I hope this article will help others. Tried to make it as beginners-friendly as possible. This is also a placeholder to get back if I forgot how I did it :) If you can improve please do. If you have questions ask at techdesk100 (at) hotmail (dot) com. Extra information Because I use mingw cygwin colinux qemu etc. I made a folder in my c drive called Linux and which has subfolders for each distribution. c:\Linux - Colinux - Cygwin - Distro (the folder with image files for colinux/qemu/distribtion iso's) - Mingw - Qemu ... Link TOOLS * explore2fs To be able to copy your files from image in Windows. One way. * unxutils like dd ls * winpcap driver for winpcap WEBSITES * colinux official site * colinux wiki * development and stable binaries website of henry nestler * colinux mailing list to search for known problems Qemu to make an minimal install image There is no (easy) way to install Fedora Core from a DVD image to a file using colinux. So I needed an emulator which had a gui, could be easily used without doing too much work, and where you could convert the file into colinux image. In the article Converting Distributions there is an example how to convert a qemu image to colinux image. For this reasons I use qemu to make an installation. PREPARATION * Download Fedora Core 6 image from Fedora and put in Distro folder (C:\Linux\Distro) * Download Qemu from most recent windows port here is official site * Extract qemu zipfile from windows port to c:\Linux\Qemu * Go to the command prompt (Windows XP => Start / Run / CMD) * make a image to install fedora core (minimal 700MB) in dos by typing (2gb would be 1024*1024*1024*2 + 63*512) fsutil file createnew c:\Linux\Distro\qemu_fc6_min_2gb 2147515904 * make a image for a 512mb swap file in dos by typing (512mb would be 1024*1024*512 + 63*512) fsutil file createnew c:\Linux\Distro\qemu_swap_512mb 536903168 * Open notepad, create next batchfile, change settings like qemu_dir and name of iso file and save it (C:\Linux\Qemu\start_installation.bat) @ECHO OFF set qemu_dir=C:\Linux\Distro set hd=%qemu_dir%\qemu_fc6_min_2gb set swap=%qemu_dir%\qemu_swap_512mb set cdrom=%qemu_dir%\FC-6_i386.ISO set mem=256 qemu -hda %hd% -hdb %swap% -cdrom %cdrom% -m %mem% -boot d -L . pause * start up start_installation.bat and install fedora core with the second drive a swap drive INSTALLATION For the installation I recommend the following steps. I use text modus where you use tab,space, arrows and enter to choose options and this steps explains text modus. With ctrl+tab you can get out the window. * first screen will ask in what modem you want to startup. To make the installation go faster you can type linux text * and press enter (if you want to install in gui mode with mouse just press enter without linux text) * you can skip dvd testing if you want to * press yes when asked to erase all data for hda and hdb * choose create custom layout and press ok * choose free space under /dev/hda1 press new and choose following options Mount point / File System type ext3 Allowable drives only hda Fill all available space selected * choose free space under /dev/hdb press new and choose following options mount point will become if you change the File System type to swap File system Type swap Allowable drives only hdb selected Fill all available space selected * If done correctly you will see Devices Start End Size Type Mount point /dev/hda hda1 1 261 2047M ext3 / /dev/hdb hdb1 1 65 509M swap * For Bootloader configuration choose Use Grub Bootloader * When asked where to install the boot loader choose /dev/hda1 First sector of boot partition * When you get to Package Selection Disable the 3 options and enable Customize software selection and press OK * In Package Group Selection disable everything. * Fedora will check dependencies (will take a long time (10 minutes) so go get some herbal tea or whatever). * Press OK and the installation will start. (took me 20 minutes so get some more tea) * When done installing press Reboot and close Qemu. CONVERTING TO COLINUX I found this on one of the wikipages. * download and install unxutils I found a link here * go to the command prompt (Windows XP => Start / Run / CMD) * go to your distro folder cd \Linux\Distro * convert qemu fedora core image to colinux image dd if=qemu_fc6_min_2gb of=fc6_min_2gb.img bs=512 skip=63 * you only need the file fc6_min_2gb.img the other 2 files (qemu_swap_512mb and qemu_fc6_min_2gb) can be removed (you could also save it for temp backup) install colinux and make image bootable '''TO KNOW' I use an extra image disk which I use between different distributions as a second disk. With Fedora Core 5 I had a problem with udev and hotplugin which gave problems with ssh etc. This was because the udev version did not support the older colinux kernel so I solved it by downloading and installing manually an older version. Thanks to Aguspiza which made a comment about using an older version of the colinux kernel, which was correct. Now I use the most recent version which is version 0.8.0 with kernel 2.6.17 and has Kernel with hotplug enabled (for udev). Before you start please check if there is a newer version of the colinux kernel at the testing folder of henry nestler. There are 2 types of network connections: TAP connection and a bridged connection(WinPCap). I normally use tap but now will use them both to show examples. For more information look at Network TAP driver creates an TAPconnection with an icon in Networkconnections. When you setup you networkcard using TAP connection goes through this TAP. This means you can only reach this connection from the host PC and not from another one. If you want to connect the internet using colinux you just make a shared connection from you internet connection (wlan or lan card) to the TAPconnection. Bridged connection is a shared connection with the network card (lan or wlan). The colinux machine is visible from outside the host PC. Colinux will also have another IP adress as the host PC. It is like two machines using the same card are connection to the internet. Both machines will ask for an IP adress and for example the router will give both a different IP. I had a problem using my WLAN card with bridged because of a disabled option in an older kernel. With LAN it did work. Did not try it with the newer kernel. '''INSTALLATION AND PREPARATION' When you have downloaded the newest version of colinux start installing it. I use normally the options '''Native Windows Linux Console', colinux Virtual Ethernet Driver (TAP-Win32) and colinux Bridged Ethernet (WinPCap). If you want to use WinPCap please install the winPcap driver. When asked for a folder I use C:\Linux\Colinux.'' * Create an extra image 1gb file by using the following command in the dosprompt (windows XP): fsutil file createnew c:\Linux\Distro\ext3_disk_1gb.img 1073741824 * Create a swap image 512 mb because I will use 256 mb memory by using the following command in the dosprompt (windows XP): fsutil file createnew c:\Linux\Distro\swap_512mb 536870912 * Use noexecute to set the correct options. IF NOT DONE CORRECT PC WILL HANG AND YOU HAVE TO RESTART. * Go to Control Panel=>Network connections * Rename the LAN connection to LAN and the TAP connection to TAP. * right click on LAN connection and press properties * go to tab advanced, enable Allow other users to connect through this computer's internet connection and choose if applicable TAP * give the TAP connection a static IP 10.0.0.10 and subnetmask 255.255.255.0 * Create a colinux.conf file in the Distro folder for example C:\Linux\Distro\colinux_fc6_minimal.conf: ############################################ # MAKE SURE THERE IS AN EXTRA LINE AT THE END # OF THE BATCH FILE # # initrd should only be used at first start # to install kernel modules for example when # you upgrade your colinux ############################################ ############################################ # DEFAULT ############################################ # set your runlevel to text-only mode or graphical mode # root=/dev/hda1 fastboot 1 (single-user mode) # root=/dev/hda1 fastboot 3 (text-only mode) # root=/dev/hda1 fastboot 5 (graphic mode) ############################################ kernel=vmlinux initrd=initrd.gz mem=256 root=/dev/hda1 fastboot 5 ############################################ # Drives ############################################ #cobd0=C:\Linux\Distro\image #hda1=:cobd0 ############################################ hda1=\DosDevices\C:\Linux\Distro\fc6_min_2gb.img hda2=\DosDevices\C:\Linux\Distro\ext3_disk_1gb.img hdb1=\DosDevices\C:\Linux\Distro\swap_512mb ############################################ # Ethernet ############################################ #eth0=slirp,00:ff:00:00:00:00 #eth0=pcap-bridge,"LAN", 00:ff:00:00:00:00 #eth0=tuntap,TAP,00:ff:00:00:00:00 ############################################ eth0=tuntap,"TAP",00:ff:00:00:00:00 eth1=pcap-bridge,"LAN",00:ff:00:00:00:01 # please leave this as last line. Otherwise last of macadress goes as input for boot * Create a batch file in the colinux folder for example C:\Linux\Colinux\start_fc6_minimal.bat: @echo off colinux-daemon.exe --install-driver colinux-daemon.exe @"c:\Linux\Distro\colinux_fc6_minimal.conf" -t nt colinux-daemon.exe --remove-driver pause * start the batchfile start_fc6_minimal.bat so colinux starts(If it does not start it will give an error message. Maybe you typed something wrong). * login with your username and pass * format swap mkswap -c -v1 -L SWAP /dev/hdb1 * format extra image to ext3 mkfs -t ext3 /dev/hda2 * edit /etc/fstab # this is what I changed mine fstab to /dev/hda1 / ext3 defaults 1 1 /dev/hda2 /mnt ext3 defaults 1 1 devpts /dev/pts devpts gid=5,mod=620 0 0 tmpfs /dev/shm tmpfs defaults 0 0 proc /proc proc defaults 0 0 sysfs /sys sysfs defaults 0 0 /dev/hdb1 swap swap defaults 0 0 NETWORKING setup eth0 * edit /etc/sysconfig/network-scripts/ifcfg-eth0 # File: /etc/sysconfig/network-script/ifcfg-eth0 DEVICE=eth0 ONBOOT=yes BOOTPROTO=static IPADDR=10.0.0.100 NETMASK=255.255.255.0 GATEWAY=10.0.0.10 #HWADDR=00:ff:00:00:00:00 * Now you can from windows ssh your colinux using 10.0.0.100 setup eth1 * edit /etc/sysconfig/network-scripts/ifcfg-eth1 if it not exists make one # File: /etc/sysconfig/network-script/ifcfg-eth1 DEVICE=eth1 ONBOOT=no BOOTPROTO=dhcp #HWADDR=00:ff:00:00:00:01 When you start colinux it will start the eth1 by using command ifup eth1 and will get an IP adress from the router where the LAN adapter gets his ip-adress. It will be a different IP-adress. With ifconfig eth1 you can find out the IP adress and ssh it from another pc. DNS * to use a dns server edit /etc/resolv.conf nameserver 111.111.111.111 UPDATE WITH YUM/SMART Normally I use yum because it is given as default. Aguspiza gave as alternative Smart. I looked at is and it has its advantages. For example the compabilty and try 'yum update' vs 'smart upgrade'. Only disadvantage I have found untill now is the lack of option groupinstall. I will put them both here so you can choose. YUM * gui version for in x-windows yum install pirut * update existing installation yum update * after update clean temp files yum clean all * if you want to change settings for the repository go to /etc/yum.repos.d/ * to install something yum install package SMART * install smart (automatically installs fedora-package-config-smart) yum install smart * gui version for in x-windows yum install smart-gui * update to get all channels smart update * update existing installation smart upgrade * because it is easy to add channels here to add channel dvd smart channel --add dvd type=rpm-sys baseurl=file:///mnt/cdrom * to install something smart install package MORE MINIMAL * Now you have a minimal install of Fedora. But you can still reduce some packages. To know what packages are installed use the command rpm -qa --queryformat='%{name},%{version},%{size}\n' > installed.csv * I remove the following packages yum remove antlr 2.7.6 2576368 aspell 0.60.3 2872309 aspell-en 6.0 3551911 bluez-gnome 0.6 68414 bluez-libs 3.7 114469 bluez-utils 3.7 799278 ccid 1.0.1 276927 coolkey 1.0.1 205842 dos2unix 3.1 31870 dosfstools 2.11 74865 gjdoc 0.7.7 1788756 gnupg 1.4.5 4696607 gpm 1.20.1 313854 ifd-egate 0.05 43897 irda-utils 0.9.17 125242 isdn4k-utils 3.2 9783508 java-1.4.2-gcj-compat 1.4.2.0 441 jpackage-utils 1.6.6 125018 lftp 3.5.1 2007655 libgcj 4.1.1 41736717 libwvstreams 4.2.2 1701078 lrzsz 0.12.20 153263 mdadm 2.5.4 1684591 minicom 2.1 606551 mkbootdisk 1.5.3 7334 nano 1.3.12 1336295 netdump 0.7.16 18207 nss_db 2.2 1707262 nss_ldap 253 3352641 openssh-clients 4.3p2 831744 pcmciautils 014 58233 pcsc-lite 1.3.1 303131 pcsc-lite-libs 1.3.1 34668 ppp 2.4.4 844434 rp-pppoe 3.5 229373 unix2dos 2.2 15125 wvdial 1.54.0 269870 yp-tools 2.9 157471 ypbind 1.19 52354 making it colinux proof When booting you get some failures. Here you can find the solutions. error: setting default font (latarcyrheb-sun16): putfont: PIO_FONT: Function not implemented * Rename the program /bin/setfont to /bin/setfont.old mv /bin/setfont /bin/setfont.old * Create a new script file /bin/setfont with condition for coLinux #!/bin/bash if ! uname -r | grep -q -e "-co-" then /bin/setfont.old $@ fi * and make it executable chmod +x /bin/setfont error: hwclock is unable to get I/O port access: the iopl(3) call failed. * coLinux don't allow hwclock. Edit file /etc/rc.d/rc.sysinit, locate the line with hwclock and add a condition for colinux: before /sbin/hwclock && /sbin/hwclock $CLOCKFLAGS after if ! uname -r | grep -q -e "-co-" then /sbin/hwclock && /sbin/hwclock $CLOCKFLAGS fi * Edit file /etc/rc.d/init.d/halt, locate the line with hwclock and write a condition for colinux: before /sbin/hwclock && action $"Syncing hardware clock to system time" /sbin/hwclock $CLOCKFLAGS after if ! uname -r | grep -q -e "-co-" then /sbin/hwclock && action $"Syncing hardware clock to system time" /sbin/hwclock $CLOCKFLAGS fi error: raidautorun: failed to open /dev/md0: 6 * comment out in /etc/rc.d/rc.sysinit before echo "raidautorun /dev/md0" | nash --quiet after #echo "raidautorun /dev/md0" | nash --quiet compress image file smallest possible Ok after you've done all this you could start to make a rar file so you can if you do something wrong just unpack the rar file and you start all over. (found at the mail list). It can become big because the empty space is not really zero so your compressor makes the file big. What you do is you make a file which has null characters that is as big as the empty space and remove the file * start with another image file and set the image you want to compress in the xml conf file in this example hda2 * mount the image into /mnt mount /mnt /dev/hda2 * remove colinux modules rm -rf /mnt/lib/modules/*-co-* * remove wtmp rm -f /mnt/var/log/wtmp * remove all from tmp rm -rf /mnt/tmp/* * clean apt get rm -rf /mnt/src/var/state/apt/lists/ayo.freshrpms.* rm -rf /mnt/src/var/cache/apt/*.bin * or clean yum chroot /mnt yum clean all exit * get the number of available space in mb chroot /mnt df -m #Filesystem 1M-blocks Used Available Use% Mounted on #/dev/hda2 1984 750 1132M 40% /mnt exit * make a file filled with zero which is almost as big as the empty space in hda2. For count do the available size of hda2 minus 2 dd if=/dev/zero of=/mnt/foobar bs=1M count=1130 * remove the zero file rm /mnt/foobar * clean /mnt/root/.bash_history * Unmount the image from /mnt umount /mnt * change mountcount etc tune2fs -c 0 /dev/hda2 tune2fs -T 20070101 /dev/hda2 If you compress it now, it will become much smaller. XDMCP (external Xwindows) login Fedora Core starts in GUI mode because you have in your colinux.conf file runlevel 5 which is graphic mode. link about runlevels root=/dev/hda1 fastboot 5 If you enable XDMCP in a normal linux environment when you start your xdm server it automatically starts the gui. But in colinux it is not possible to do that. My colinux crashed a lot before I could use it. This costed me two days to figure out because of 1 line in the Xserver file. Another usefull link To start a desktop environment you first need a display manager like kdm/xdm/gdm. For the XDMCP client I use XMING and for Desktop Environment I use KDE. (but you can use your own like winx-32 x-deep32 and GNOME). SECURITY / CONFIG FILE First step enable xdmcp on firewall. * start firewall configure tool system-config-securitylevel-tui * in Customize->Other ports xdmcp:udp If you have more than one display manager and you want to switch between them you can create a file and put the correct manager in it. Only the Displaymanager part worked for me and only to switch between xdm and gdm. kdm did not work with this adjustment. * create config file touch /etc/sysconfig/desktop * edit config file and choose your own setting # DISPLAY=, where is one of the following: # GNOME — Selects the GNOME desktop environment. # KDE — Selects the KDE desktop environment. # DISPLAYMANAGER=, where is one of the following: # GDM — Selects the GNOME display manager. # KDM — Selects the KDE display manager. # XDM — Selects the XFree86 display manager. DISPLAYMANAGER=GDM FONT SERVER * install font server and include fonts xorg-x11-xfs smart install xorg-x11-fonts-Type1 DISPLAY MANAGER I liked gdm best. Was fast and you could change the correct Display with just a click. GDM * install gdm smart install gdm * enable xdmcp on login manager /etc/gdm/custom.conf before xdmcp servers security after xdmcp Enable=true servers 0=inactive security #put the following line only if you want to allow login as root #AllowRemoteRoot=true * don't forget to choose first time desktop environment under session * to stop error "no theme index file /usr/share/icons/hicolor" smart install hicolor-icon-theme XDM * install xdm smart install xdm * create a file to tell which Desktop Environment to start touch ~/.xsession * give the correct sessions to the file #!/bin/sh # comment out one of the three following lines # exec /usr/bin/gnome-session # exec /usr/bin/startkde # exec /usr/bin/startxfce4 * make executable chmod +x ~/.xsession * for one weird reason the regsess was not at the correct location so i had to copy it cp /usr/bin/regress /usr/X11R6/bin/sessreg * comment out in /etc/X11/xdm/xdm-config before DisplayManager.requestPort: 0 after ! DisplayManager.requestPort: 0 * edit for external login (every pc) in /etc/X11/xdm/Xaccess before #* # any host can get a login window after * # any host can get a login window * edit for internal login (host pc) in /etc/X11/xdm/Xaccess before #* # any host can get a login window after (to make only the host PC be able to get XDMCP connection) 10.0.0.10 # any host can get a login window after (to make any PC able to get XDMCP connection eth1 with winPCap should be enabled) * # any host can get a login window * comment out in /etc/X11/xdm/Xservers (to make it not start xwindows for local machine) before :0 local /usr/bin/X after #:0 local /usr/bin/X KDM * kdm can only be installed using kdebase or you have to download from somewhere a rpm smart install kdebase * follow the same steps as in XDM * edit in /etc/X11/xdm/kdmrc before xdmcp Enable=false #Port=177 General StaticServers=:0 after xdmcp Enable=true Port=177 General #comment out to make it not start xwindows for local machine #StaticServers=:0 DESKTOP ENVIRONMENT KDE * get minimal kde yum install kdebase * or get full kde yum groupinstall "KDE (K Desktop Environment)" GNOME * get minimal gnome yum install gnome-core * or get full GNOME yum groupinstall "GNOME Desktop Environment" XFCE4 * install xfce yum groupinstall XFCE XMING * create an xlaunch file by ** starting xlaunch and choosing the options below and at the last screen choose save configuration Display Settings One window Display number 0 Start Xming Open Session via XDMCP Connect to host 10.0.0.100 (or if you are connection from the outside the IP adress from eth1 using winPCap) Clipboard enabled ** or create file xming.xlaunch on windows host * doublepress xming.xlaunch to start xming and voila you have your xwindows VNC (external Xwindows) login Fedora Core starts in GUI mode because you have in your colinux.conf file runlevel 5 which is graphic mode. link about runlevels root=/dev/hda1 fastboot 5 For the VNC client I use RealVNC and for Desktop Environment I use KDE. (but you can use your own like winx-32 tightvnc and GNOME). Another usefull link * startup eth1 or have eth0 in shared mode ifup eth1 * get xwindows ** get minimal kde yum install kdebase ** or get full kde yum groupinstall "KDE (K Desktop Environment)" ** or get full GNOME (with setup xdmcp you are for now on your own/Maybe somebody could add to this) yum groupinstall "GNOME Desktop Environment" ** In Fedora core 5 and 6 the fonts are not installed automatically using dependencies. If you try to use XDMCP you will see strange fonts. yum install xorg-x11-fonts-Type1 * install the vnc server yum install vnc-server * first time create password and files vncserver * edit in your home dir /home/user/.vnc/xstartup or root dir /root/.vnc/xstartup to let automatically start KDE otherwise you will get gray screen before xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop"& twm & after #xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop"& #twm & startkde & SETUP FIREWALL VNC SERVER Each VNC server instance listens on port 5900 plus the display number on which the server runs. For example: Display 1 5901 Display 2 5902 etc. * start firewall configure tool system-config-securitylevel-tui * in Customize->Other ports use the correct portnumber.For the automatic startup I use display 1 which uses port 5901 5901:tcp * restart xwindows shutdown -r now STARTUP VNC SERVER AUTOMATICALLY * edit in /etc/sysconfig/vncservers before #VNCSERVERS="2:myusername" #VNCSERVERARGS2="-geometry 800x600 -nolisten tcp -nohttpd -localhost" after, use your own username instead of root #VNCSERVERS="2:myusername" #VNCSERVERARGS2="-geometry 800x600 -nolisten tcp -nohttpd -localhost" VNCSERVERS="1:root" VNCSERVERARGS1="-geometry 1024x768" * make the VNC server start on boot chkconfig vncserver on * restart colinux shutdown -r now * now you can reach your VNC server with your VNC client using the IP of colinux with the displaynumber. 10.0.0.100:1 OR STARTUP VNC SERVER MANUALLY * start vnc server vncserver -geometry 1024x768 * first time it will ask for a password * It wil say at which display vnc server is started. For example display :1 New 'localhost.localdomain:1 (root)' desktop is localhost.localdomain:1 * start your vnc client and fill in the IP of colinux with the displaynumber. 10.0.0.100:1 VNC Server commands * restart VNC server service vncserver restart * kill VNC server for a certain display, i.e. display :2 vncserver -kill :2